<template>
    <div class="big-box">
        <div class="header">
            <img src="../../../../../assets/bigScreen/header4.png" alt="" />
            <div class="backBox" @click="goBack"></div>
        </div>
        <div class="backToBox">
            <div class="backTo" @click="gotoHome">
                <div>返回总窗口</div>
            </div>
            <div class="backTo" @click="backToOne">
                <div>返回上一页</div>
            </div>
        </div>
        <div class="centerBox">
            <div class="sreenTitle">融资需求</div>
            <div class="center">

                <div class="search_box" v-if="tabAct == 0">
                    <div class="search_box_top">
                        <!-- <div class="search_box_top_title"></div> -->
                        <!-- <div class="adds" @click="toPageAdd('capitalAdd')">发布</div> -->
                        <div>
                            <a-input-search v-model:value="value" placeholder="请输入关键词" enter-button="搜索" @pressEnter="onSearch" @search="onSearch"
                                style="width: 50rem;height: 40px;" class="inp-sea" />
                        </div>
                    </div>
                    <!-- <div class="search_box_middle">
				<div class="search_box_middle_item">
					<div class="search_box_middle_item_name">内蒙古</div>
					<div class="search_box_middle_item_tag">
						<div class="search_box_middle_item_tagItem active">全部</div>
						<div class="search_box_middle_item_tagItem">呼和浩特市</div>
						<div class="search_box_middle_item_tagItem">包头市</div>
						<div class="search_box_middle_item_tagItem">乌海市</div>
						<div class="search_box_middle_item_tagItem">赤峰市</div>
						<div class="search_box_middle_item_tagItem">呼伦贝尔市</div>
						<div class="search_box_middle_item_tagItem">兴安盟</div>
						<div class="search_box_middle_item_tagItem">乌兰察布市</div>
					</div>
					<div class="search_box_middle_item_more">更多分类<img src="../../../assets/more-icon.png" alt=""></div>
				</div>
				<div class="search_box_middle_item">
					<div class="search_box_middle_item_name">额度</div>
					<div class="search_box_middle_item_tag">
						<div class="search_box_middle_item_tagItem active">全部</div>
						<div class="search_box_middle_item_tagItem">500万以下</div>
						<div class="search_box_middle_item_tagItem">500至1000万</div>
						<div class="search_box_middle_item_tagItem">1000万以上</div>
						<div class="search_box_middle_item_tagItem">1500万以上</div>
						<div class="search_box_middle_item_tagItem">2000万以上</div>
						<div class="search_box_middle_item_tagItem">2500万以上</div>
					</div>
					<div class="search_box_middle_item_more"></div>
				</div>
			</div> -->
                    <div class="search_box_bottom">
                        <!-- <div class="search_box_bottom_title">机构记录</div> -->
                        <div class="search_box_bottom_content" v-if="list.length">
                            <div class="search_box_bottom_content_item" v-for="(item, index) in list" :key="index" @click="toPage(item.id)">

                                <div class="search_box_bottom_content_item_right">
                                    <div class="item_title">{{ item.name }}</div>
                                    <!-- <div class="item_content">《互联网信息服务算法推荐管理规定》已经2021年11月16日国家互联网信息办公室2021年第20次室务会议审议通过，并经工业
							</div> -->
                                    <div class="item_info">
                                        <div class="item_info_item">
                                            <!-- <img src="../../../assets/phone.png" alt=""
										style="width:1.8rem;height:1.8rem;margin-top:0.5rem"> -->
                                            <div>融资地区：{{ item.financingArea }}</div>
                                        </div>
                                        <div class="item_info_item">
                                            <!-- <img src="../../../assets/time.png" alt=""
										style="width:1.8rem;height:1.8rem;margin-top:0.5rem"> -->
                                            <div style="margin-left: 2rem;">融资类型：{{ item.financingMode }}</div>
                                        </div>
                                    </div>
                                    <div class="item_info_price">{{ item.amount }}</div>
                                </div>
                                <div class="search_box_bottom_content_item_left">
                                    查看详情
                                    <!-- <img src="../../../assets/org_default.png" alt="" style="width:100%;height:100%"> -->
                                </div>
                            </div>

                            <div class="pagination-box">
                                <a-pagination :showSizeChanger='false' v-model:current="parmas.number" v-model:pageSize="parmas.size" :total="parmas.total"
                                    @change="onShowSizeChange" />
                            </div>
                        </div>
                        <div v-else style="padding-bottom: 20px;">
                            <noData />
                        </div>
                    </div>
                </div>
                <div class="search_box" v-else>
                    <div class="search_box_middle" style="background: #F6FAFF;padding: 3.2rem;padding-bottom: 0;">
                        <div style="width: 95%;">
                            <div class="search_box_middle_item">
                                <div class="search_box_middle_item_name">专家职称：</div>
                                <div class="search_box_middle_item_tag" style="width: 75%;">
                                    <div class="search_box_middle_item_tagItem active">全部</div>
                                    <div class="search_box_middle_item_tagItem">自治区重点实验室</div>
                                    <div class="search_box_middle_item_tagItem">技术创新中心</div>
                                    <div class="search_box_middle_item_tagItem">高新技术企业</div>
                                    <div class="search_box_middle_item_tagItem">科技型中小企业</div>
                                    <div class="search_box_middle_item_tagItem">企业研究开发中心</div>
                                    <div class="search_box_middle_item_tagItem">临床医学研究中心</div>
                                </div>
                                <div class="search_box_middle_item_more" style="width: 20%;">
                                </div>
                            </div>
                            <div class="search_box_middle_item">
                                <div class="search_box_middle_item_name">服务领域：</div>
                                <div class="search_box_middle_item_tag" style="width: 75%;justify-content: left;">
                                    <div class="search_box_middle_item_tagItem active">不限</div>
                                    <a-select style="width: 30rem;margin-left: 2rem;" placeholder="请选择">
                                        <a-select-option value="jack">
                                            Jack
                                        </a-select-option>
                                        <a-select-option value="lucy">
                                            Lucy
                                        </a-select-option>
                                        <a-select-option value="disabled" disabled>
                                            Disabled
                                        </a-select-option>
                                        <a-select-option value="Yiminghe">
                                            yiminghe
                                        </a-select-option>
                                    </a-select>
                                    <!-- <a-input v-model:value="value1" placeholder="请输入关键词" style="width: 30rem" /> -->
                                </div>
                                <div class="search_box_middle_item_more" style="width: 20%;"></div>
                            </div>
                            <div class="search_box_middle_item">
                                <div class="search_box_middle_item_name">所在地区：</div>
                                <div class="search_box_middle_item_tag" style="width: 75%;justify-content: left;">
                                    <div class="search_box_middle_item_tagItem active">不限</div>
                                    <a-select style="width: 30rem;margin-left: 2rem;border-radius: 1rem;" placeholder="请选择省">
                                        <a-select-option value="jack">
                                            Jack
                                        </a-select-option>
                                    </a-select>
                                    <a-select style="width: 30rem;margin-left: 2rem;border-radius: 1rem;" placeholder="请选择市">
                                        <a-select-option value="jack">
                                            Jack
                                        </a-select-option>
                                    </a-select>
                                </div>
                                <div class="search_box_middle_item_more" style="width: 20%;"></div>
                            </div>
                        </div>
                        <div class="p-num">
                            <p>现有专家人数</p>
                            <p><span>34470</span>人</p>
                        </div>
                    </div>
                    <div class="personnel-list">
                        <div class="personnel-item" v-for="item in 10">
                            <img src="../../../../../assets/person.png" alt="">
                            <div class="personnel-massage">
                                <div><span class="name">郭国强</span>副研究员</div>
                                <div><span class="label">现代农业</span></div>
                                <div>衡阳市农业科学院</div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</template>

<script>
import headerBox from "../../../../../components/header.vue"
import headerImg from "../../../../../components/headerImg.vue"
import footerBox from "../../../../../components/footer-box.vue"
import { useRouter } from "vue-router"
import { getFinancingProject } from "../../../../../api/capital"
import { ref, reactive, onBeforeMount } from "vue"
import noData from "../../../no-data.vue";
// import actTabs from "./components/act-tabs.vue"
export default {
    components: {
        headerBox,
        // actTabs,
        headerImg,
        footerBox,
        noData
    },
    data() {
        return {
            tabList: ['科研机构', '科研人才'],
            tabAct: 0,
            activeList: [],
            value: '',
            value1: '',
            value2: '',
            value3: '',
            list: [],
            parmas: {
                name: '',
                number: 1, //第几页
                size: 10, //每页中显示数据的条数
                total: 0
            },
        }
    },
    mounted() {
        // if (this.$route.query.tabAct) {
        // 	this.tabAct = this.$route.query.tabAct;
        // }
        // this.init();
        this.getDet()
    },
    methods: {
        onSearch(value) {
            console.log(value);
            this.parmas.name = value
            this.getDet()
        },
        changeTab(k) {
            this.tabAct = k;
        },
        init() {
            getActivityList().then(res => {
                if (res.code === 200) {
                    this.activeList = res.data.list;
                }
            })
        },
        toPageAdd(url) {
            this.$router.push({
                path: url
            })
        },
        toPage(id) {
            this.$router.push({
                path: '/bigScreen/financingDetail',
                query: { id }
            })
        },
        getDet() {
            getFinancingProject(this.parmas).then(res => {
                if (res.code === 200) {
                    this.list = res.data.list.slice(0, 10);
                    console.log(this.list);
                    this.parmas.total = res.data.total

                }
            })
        },
        onShowSizeChange(current, pageSize) {
            this.parmas.number = current
            this.parmas.size = pageSize
            this.getDet()
            console.log(current, pageSize);
        },

gotoHome() {
    this.$router.push({
        path: '/bigScreenIndex',
    })
},
backToOne() {
    console.log('11');
    this.$router.go(-1)
},
goBack() {
            this.$router.push('/chart')
        }
    }
}
</script>

<style scoped lang="scss">
@font-face {
    font-family: "ffa";
    src: url(../../../assets/bigScreen/fonts/DS-DIGIB.TTF);
}
ul,
li {
    list-style: none;
}
.big-box {
    background-color: #071c3b;
    height: 100vh;
}
.header {
    position: relative;
    text-align: center;
    position: relative;
    height: 19.1rem;

    .backBox {
        position: absolute;
        top: 0;
        left: 50%;
        transform: translateX(-50%);
        width: 70rem;
        height: 10rem;
        cursor: pointer;
    }

    > img {
        width: 100%;
        max-height: 100%;
        margin-top: -1.1rem;
        image-rendering: -moz-crisp-edges; /* Firefox */
        image-rendering: -o-crisp-edges; /* Opera */
        image-rendering: -webkit-optimize-contrast; /* Webkit (non-standard naming) */
        image-rendering: crisp-edges;
        -ms-interpolation-mode: nearest-neighbor; /* IE (non-standard property) */
    }
}
.centerBox {
    width: 96%;
    margin: 0 auto;
    position: absolute;
    top: 14rem;
    left: 2%;
    .sreenTitle {
        background-image: url("../../../../../assets/bigScreen/sreenTitle.png");
        background-size: 100% 100%;
        height: 3.8rem;
        padding-left: 35px;
        font-weight: 600;
        color: #fff;
        display: flex;
        align-items: center;
    }
    .center {
        margin-top: 1rem;
        height: calc(100vh - 20rem);
        border: 1px solid;
        border-image: linear-gradient(
                130deg,
                #2385df 0%,
                rgba(35, 133, 223, 0.65) 92%
            )
            1;
        overflow-y: scroll;
        padding: 20px;

        .search_box {
            width: 140rem;
            // background: #ffffff;
            margin: 3rem auto 0;
            padding: 3rem 4rem 0rem;

            .personnel-list {
                display: flex;
                flex-wrap: wrap;

                .personnel-item {
                    width: 42rem;
                    margin: 3rem 1rem 0;
                    height: 15.6rem;
                    border-radius: 0.8rem;
                    background: #ffffff;
                    border: 1px solid #cccccc;
                    display: flex;
                    padding: 2.5rem 4rem;

                    .personnel-massage {
                        font-family: PingFangSC-Regular;
                        font-size: 1.6rem;
                        font-weight: normal;
                        line-height: 1.9rem;
                        color: #393939;
                        display: block;

                        > div {
                            display: flex;
                        }

                        .label {
                            border-radius: 0.4rem;
                            margin: 1.6rem 0;
                            padding: 0.6rem 0.8rem;
                            color: #037aff;
                            background: #e3edff;
                        }

                        .name {
                            font-family: PingFangSC-Semibold;
                            font-size: 2.4rem;
                            font-weight: normal;
                            color: #000000;
                            margin-right: 2rem;
                        }
                    }

                    img {
                        width: 10rem;
                        height: 10rem;
                        border-radius: 50%;
                        margin-right: 3rem;
                    }
                }
            }

            .search_box_top {
                display: flex;
                justify-content: space-between;
                align-content: center;
                padding-bottom: 3rem;
                border-bottom: 1px solid #4494ff46;

                .search_box_top_title {
                    font-size: 2.4rem;
                    color: #037aff;
                }

                .adds {
                    width: 120px;
                    height: 40px;
                    line-height: 40px;
                    text-align: center;
                    background: #037aff;
                    border-radius: 4px;
                    font-size: 15px;
                    color: #ffffff;
                    cursor: pointer;
                }
                ::v-deep input {
                    background-color: transparent;
                    border: 1px solid #4494ff46;
                    color: #fff;
                }
            }

            .search_box_middle {
                padding: 2rem 0 0 0;
                position: relative;

                .p-num {
                    position: absolute;
                    right: 0;
                    top: 3.2rem;
                    width: 20%;
                    height: 17.4rem;
                    border-left: 1px solid #d8d8d8;
                    color: #888888;
                    font-size: 1.8rem;
                    text-align: center;

                    span {
                        font-size: 3.6rem;
                        color: #ce0000;
                        margin-top: 2.8rem;
                    }
                }

                .search_box_middle_item {
                    display: flex;
                    justify-content: space-between;
                    align-items: center;
                    padding-bottom: 3rem;

                    .search_box_middle_item_name {
                        width: 8%;
                        font-size: 1.8rem;
                        color: #232323;
                    }

                    .search_box_middle_item_tag {
                        width: 84%;
                        display: flex;
                        justify-content: space-between;

                        .search_box_middle_item_tagItem {
                            font-size: 1.6rem;
                            color: rgba(0, 0, 0, 0.85);
                            cursor: pointer;
                        }

                        .active {
                            border-radius: 0.4rem;
                            background: rgba(3, 122, 255, 0.1);
                            color: #037aff;
                            padding: 0.3rem 1.4rem;
                        }
                    }

                    .search_box_middle_item_more {
                        width: 10%;
                        font-size: 1.6rem;
                        color: #037aff;
                        text-align: right;
                        display: flex;
                        align-items: center;
                        justify-content: flex-end;
                        cursor: pointer;

                        img {
                            margin-left: 1rem;
                        }
                    }
                }
            }

            .search_box_bottom {
                .search_box_bottom_title {
                    font-size: 2.4rem;
                    color: #037aff;
                }

                .search_box_bottom_content {
                    display: flex;
                    justify-content: space-between;
                    flex-wrap: wrap;
                    padding-top: 1.4rem;

                    .search_box_bottom_content_item {
                        display: flex;
                        justify-content: left;
                        align-items: center;
                        width: 65rem;
                        height: 16rem;
                        border-radius: 8px;
                        // background-image: url("../../../assets/capital/itemBg.png");
                        background-color: #082853;
                        background-size: 100% 100%;
                        // background: linear-gradient(180deg, rgba(245, 248, 252, 0.70) 0%, #FFFFFF 100%);
                        box-sizing: border-box;
                        // border: 0.1rem solid #FFFFFF;
                        // box-shadow: 8px 8px 20px 0rem rgba(231, 237, 247, 0.51);
                        margin-bottom: 2rem;
                        padding: 2rem;
                        border: 1px solid #4494ff46;
                        cursor: pointer;

                        .search_box_bottom_content_item_left {
                            width: 14rem;
                            height: 4.8rem;
                            background: #037dff;
                            border-radius: 4px;
                            color: #ffffff;
                            font-size: 1.8rem;
                            text-align: center;
                            line-height: 4.8rem;
                        }

                        .search_box_bottom_content_item_right {
                            display: flex;
                            justify-content: space-between;
                            flex-direction: column;
                            height: 100%;
                            width: calc(100% - 14rem);
                            margin-left: 2rem;

                            .item_title {
                                font-size: 2rem;
                                color: #fff;
                            }

                            .item_content {
                                font-size: 1.6rem;
                                color: rgba(255, 255, 255, 0.85);
                            }

                            .item_info {
                                display: flex;
                                // justify-content: space-between;
                                font-size: 1.6rem;
                                color: #555555;

                                .item_info_item {
                                    display: flex;
                                    color: #fff;
                                    // align-items: center;
                                }
                            }

                            .item_info_price {
                                font-size: 3rem;
                                color: #FFEF09;

                                span {
                                    font-size: 1.6rem;
                                    color: rgba(0, 0, 0, 0.85);
                                }
                            }
                        }
                    }
                }
            }

            .pagination-box {
                width: 100%;
                height: 10rem;
                display: flex;
                align-items: center;
                justify-content: center;
            }
        }
    }
    ::-webkit-scrollbar {
        width: 5px;
        height: 10px;
    }

    /* 滚动条轨道 */
    ::-webkit-scrollbar-track {
        background-color: #234470;
    }

    /* 滚动条滑块 */
    ::-webkit-scrollbar-thumb {
        background-color: #061c57;
    }

    /* 鼠标悬停在滚动条上的滑块 */
    ::-webkit-scrollbar-thumb:hover {
        background-color: #555;
    }
}
.backToBox {
    position: absolute;
    top: 8rem;
    right: 2%;
    display: flex;
    .backTo {
        background-image: url("../../../../../assets/bigScreen/backTo.png");
        color: #2dccff;
        background-size: 100% 100%;
        width: fit-content;
        padding: 2px 40px 10px 10px;
        font-weight: 600;
        cursor: pointer;
        margin-left: 10px;
        div {
            padding-top: 5px;
        }
    }
}::v-deep {
    .ant-btn-primary {
        border-color: #037aff;
        background: #037aff;
    }

    .ant-input {
        background: rgba(68, 148, 255, 0.12);
        border: none;
        color: #ffffff;
    }

    .ant-pagination-item {
        background: rgba(8, 26, 48, 0.8);
        border: 1px solid #0b2f5f;
    }

    .ant-pagination-item a {
        color: #ffffff;
    }

    .ant-pagination-prev .ant-pagination-item-link,
    .ant-pagination-next .ant-pagination-item-link {
        background: rgba(8, 26, 48, 0.8);
        border: 1px solid #0b2f5f;
        color: #707981;
    }

    .ant-pagination-disabled .ant-pagination-item-link {
        background: rgba(8, 26, 48, 0.8);
        border: 1px solid #0b2f5f;
        color: #707981;
    }

    .ant-pagination-item-active {
        background: #004dfd;
        border-radius: 2px;
        border: none;
    }

    .ant-pagination-jump-prev
        .ant-pagination-item-container
        .ant-pagination-item-ellipsis,
    .ant-pagination-jump-next
        .ant-pagination-item-container
        .ant-pagination-item-ellipsis {
        color: #ffffff;
    }
    .ant-select-selector {
        background-color: transparent !important;
        background: rgba(8, 26, 48, 0.8) !important;
        border: 1px solid #0b2f5f !important;
        color: #ffffff !important;
    }
}
</style>
